home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 18
/
AMIGAplus Sonderheft 18 (1999)(ICP)(DE)[!].iso
/
PD
/
Anwendungen
/
FS1541-13
/
volume.h
< prev
Wrap
C/C++ Source or Header
|
1999-01-03
|
2KB
|
96 lines
/*
* FS1541 - volume, BAM and lock handling (header)
*
* Copyright (C) 1996 - 1998 Michael Krause
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <dos/dosextens.h>
LONG InitVolumeSS(void);
void QuitVolumeSS(void);
void DoDiskInsert(void);
void DoDiskRemove(void);
UWORD Block2TS(UWORD blk);
UWORD AllocBlock(UBYTE fromt, UBYTE froms);
void FreeBlock(UBYTE t, UBYTE s);
UWORD UsedBlocks(void);
void OptimizeDirectory(void);
void StartUDSTimer(void);
void StopUDSTimer(void);
void UpdateDiskStructure(void);
BPTR makelock(LONG flkey, LONG axs);
void freelock(struct FileLock *fl);
BOOL lockable(UBYTE t, UBYTE s, LONG mode);
extern BYTE diskchgintbit;
extern struct VolumeNode *curvolumenode;
extern struct DosList *curdoslist;
extern int disk_inserted;
extern struct timerequest *UDStimer;
extern struct BAM *bam;
extern struct DirEntry directory[144];
extern int dirsize;
extern UBYTE interleave;
struct VolumeNode {
struct MinNode node;
struct DosList *volnode;
struct FileLock *locklist;
UBYTE name[30]; /* this is a BCPL string */
ULONG dollarlen;
UBYTE dollarbuf[30*(144+2)];
};
struct BAM {
UBYTE dirt,dirs;
UBYTE id;
UBYTE dside;
ULONG tracks[35];
UBYTE name[16];
UBYTE pad1[2];
UBYTE name2[5];
UBYTE pad2[89];
};
struct DirEntry {
UBYTE t,s;
UBYTE type;
UBYTE datat,datas;
UBYTE name[16];
UBYTE relsst,relsss;
UBYTE rellen;
UBYTE pad[4];
UBYTE tmpdatat,tmpdatas;
UBYTE lengthl,lengthh;
};
struct DataBlock {
UBYTE t,s;
UBYTE data[254];
};